import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import './style.css'

// 路由配置
const routes = [
  {
    path: '/',
    name: 'Dashboard',
    component: () => import('./views/Dashboard.vue')
  },
  {
    path: '/users',
    name: 'Users',
    component: () => import('./views/Users.vue')
  },
  {
    path: '/products',
    name: 'Products',
    component: () => import('./views/Products.vue')
  },
  {
    path: '/orders',
    name: 'Orders',
    component: () => import('./views/Orders.vue')
  },
  {
    path: '/categories',
    name: 'Categories',
    component: () => import('./views/Categories.vue')
  },
  {
    path: '/inventory',
    name: 'Inventory',
    component: () => import('./views/Inventory.vue')
  },
  {
    path: '/settings',
    name: 'Settings',
    component: () => import('./views/Settings.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

const app = createApp(App)
app.use(router)
app.mount('#app') 